home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 26 (Anniversary Edition)
/
Volume 26 [Anniversary Edition] - JOGO DISK .iso
/
DEPOSITO
/
REmovido
/
Esportes
/
FlashGOL.swf
/
scripts
/
frame_2
/
DoAction.as
Wrap
Text File
|
2006-06-13
|
3KB
|
129 lines
_quality = "HIGH";
stopAllSounds();
movieClip.prototype.multi = 10;
movieClip.prototype.vel = 5;
MovieClip.prototype.x0 = 320;
MovieClip.prototype.y0 = 240;
MovieClip.prototype.Fescala = 4;
MovieClip.prototype.Dfocal = 200;
MovieClip.prototype.FNpunto3D = function()
{
Pfocal = Dfocal / (z + Dfocal);
escala = Pfocal * Fescala;
Xpos = Pfocal * x + x0;
Ypos = Pfocal * y + y0;
};
MovieClip.prototype.FNsitua3D = function()
{
_xscale = _yscale = escala;
_X = Xpos;
_Y = Ypos;
_alpha = 100;
};
MovieClip.prototype.FNcos = function(n)
{
var grados = Math.cos(n * 3.141592653589793 / 180);
return grados;
};
MovieClip.prototype.FNsin = function(n)
{
var grados = Math.sin(n * 3.141592653589793 / 180);
return grados;
};
MovieClip.prototype.FNtan = function(n)
{
var grados = Math.sin(n * 3.141592653589793 / 180) / Math.cos(n * 3.141592653589793 / 180);
return grados;
};
MovieClip.prototype.FNasin = function(n)
{
var grados = Math.asin(n);
grados = grados * 180 / 3.141592653589793;
return grados;
};
MovieClip.prototype.FNacos = function(n)
{
var grados = Math.acos(n);
grados = grados * 180 / 3.141592653589793;
return grados;
};
MovieClip.prototype.FNatan = function(n)
{
var grados = Math.atan(n);
grados = grados * 180 / 3.141592653589793;
return grados;
};
MovieClip.prototype.FNdistancia = function(x1, y1, x2, y2)
{
var dist = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
return dist;
};
MovieClip.prototype.FNangulo = function(x1, y1, x2, y2)
{
y1 >= y2 ? (ang = 90 + Math.atan((x1 - x2) / (y1 - y2)) * 180 / 3.141592653589793) : (ang = 270 + Math.atan((x1 - x2) / (y1 - y2)) * 180 / 3.141592653589793);
return ang;
};
MovieClip.prototype.FNPuntos = function(x1, y1, x2, y2, objeto)
{
var angulo = null;
y1 >= y2 ? (angulo = 90 + Math.atan((x1 - x2) / (y1 - y2)) * 180 / 3.141592653589793) : (angulo = 270 + Math.atan((x1 - x2) / (y1 - y2)) * 180 / 3.141592653589793);
var dix = x2 - x1;
var diy = y2 - y1;
var distancia = Math.sqrt(dix * dix + diy * diy);
eval(objeto)._x = x1;
eval(objeto)._y = y1;
eval(objeto)._rotation = -90 - angulo;
eval(objeto)._xscale = eval(objeto)._yscale = distancia / 10;
};
MovieClip.prototype.FNrotarX = function(angulo)
{
var subY = y;
var subZ = z;
y = FNcos(angulo) * suby - FNsin(angulo) * subz;
z = FNsin(angulo) * suby + FNcos(angulo) * subz;
};
MovieClip.prototype.FNrotarY = function(angulo)
{
var subX = x;
var subZ = z;
z = FNcos(angulo) * subZ - FNsin(angulo) * subX;
x = FNcos(angulo) * subX + FNsin(angulo) * subZ;
};
MovieClip.prototype.FNrotarZ = function(angulo)
{
var subX = x;
var subY = y;
x = FNcos(angulo) * subX - FNsin(angulo) * subY;
y = FNsin(angulo) * subX + FNcos(angulo) * subY;
};
MovieClip.prototype.FNescala = function(factor, incX, incY)
{
_xscale = _yscale = 100 + 25 * factor;
_X = -80 * factor + incX;
_Y = -80 * factor + incY;
};
MovieClip.prototype.FNrgb = function(r, g, b)
{
c = new Color(this);
r = r.toString(16);
g = g.toString(16);
b = b.toString(16);
if(g.length < 2)
{
g = "0" + g;
}
if(b.length < 2)
{
b = "0" + b;
}
if(r.length < 2)
{
c.setRGB(parseInt("0x0" + r + g + b));
}
else
{
c.setRGB(parseInt("0x" + r + g + b));
}
};
cnt = "MAD";